package src;

import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;


public class Oval extends Figure {
	@Override
	public String getDiscription() {
		return "Oval an Positon "+getX()+", "+getY();
	}

	@Override
	public void paintObject(Graphics2D g2) {
		g2.setColor(getColor());
		Ellipse2D.Double ellipse = new Ellipse2D.Double(getX(), getY(), getWidth(), getHeight());
		if(getFill()) g2.fill(ellipse);
		else g2.draw(ellipse);
	}
}